import { getItem, setItem } from "@/utils/storage"

// 时间戳
const TIMESTAMP = 'timeStamp'
// 时长
const TIMEOUT = 1 * 60 * 60 * 1000
// 设置时间戳
export function setTimeStamp() {
  setItem(TIMESTAMP, Date.now())
}
// 获取时间戳
export function getTimeStamp() {
  return getItem(TIMESTAMP)
}
// 是否超时
export function checkTimeOut() {
  return Date.now - getTimeStamp() > TIMEOUT
}
